<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateClienteTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateClienteLabel_idCliente}" for="idCliente" />
                    <h:inputText id="idCliente" value="#{clienteController.selected.idCliente}" title="#{bundle.CreateClienteTitle_idCliente}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_idCliente}"/>
                    <h:outputLabel value="#{bundle.CreateClienteLabel_apellido}" for="apellido" />
                    <h:inputText id="apellido" value="#{clienteController.selected.apellido}" title="#{bundle.CreateClienteTitle_apellido}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_apellido}"/>
                    <h:outputLabel value="#{bundle.CreateClienteLabel_direccion}" for="direccion" />
                    <h:inputText id="direccion" value="#{clienteController.selected.direccion}" title="#{bundle.CreateClienteTitle_direccion}" />
                    <h:outputLabel value="#{bundle.CreateClienteLabel_nombre}" for="nombre" />
                    <h:inputText id="nombre" value="#{clienteController.selected.nombre}" title="#{bundle.CreateClienteTitle_nombre}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_nombre}"/>
                    <h:outputLabel value="#{bundle.CreateClienteLabel_telefono}" for="telefono" />
                    <h:inputText id="telefono" value="#{clienteController.selected.telefono}" title="#{bundle.CreateClienteTitle_telefono}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{clienteController.create}" value="#{bundle.CreateClienteSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{clienteController.prepareList}" value="#{bundle.CreateClienteShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateClienteIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
